<ul class="nav nav-tabs nav-tabs--course" role="tablist">
  {% for tab in tabs %}
      <li role="presentation" id="{{ tab.id }}"
          class="{% if moduleId|default('') == tab.id%}active{% endif %}">
        <a
          {% if member|default(false) and previewAs|default(null) == 'member' %}
            href="{{ path('my_item_bank_exercise_show', {'id': exercise.id, 'tab': tab.type, 'moduleId': tab.id, 'previewAs':previewAs}) }}"
          {% else %}
            href="{{ path('item_bank_exercise_show', {'id': exercise.id, 'tab': tab.type, 'moduleId':tab.id, 'previewAs':previewAs}) }}"
          {% endif %}
        >
          {{ tab.title }}
        </a>
      </li>
  {% endfor %}
  {% if setting('ugc_review.enable_review')|default('1') == '1' and setting('ugc_review.enable_question_bank_review')|default('1') == '1' %}
  <li role="presentation" id="reviews"
      class="{% if route_params.tab|default('') == 'reviews'  or nav|default('') == 'reviews' %}active{% endif %}">
    <a
      {% if member|default(false) and previewAs|default(null) == 'member' %}
        href="{{ path('my_item_bank_exercise_show', {'id': exercise.id, 'tab': 'reviews', 'previewAs':previewAs}) }}"
      {% else %}
        href="{{ path('item_bank_exercise_show', {'id': exercise.id, 'tab': 'reviews', 'previewAs':previewAs}) }}"
      {% endif %}
    >
      {{ 'course.tab.reviews'|trans }}
      <small>({{ exercise.ratingNum|default(0) }})</small>
    </a>
  </li>
  {% endif %}
</ul>